<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>map()返回每个元素调用函数后的返回值</title>
</head>

<body>
    <script>
        let arr = [9, 8, 7, 6];
        // const newarr = arr.map(value => value * 2);
        var newarr = arr.map(value => value * 2);
        console.log(newarr); //[18, 16, 14, 12]
    </script>
</body>

</html>